fs/hfsplus: Set a grub_errno if mount fails
authorB Horn <b@horn.uk>
Sun, 12 May 2024 05:22:51 +0000 (06:22 +0100)
committerFelix Zielcke <fzielcke@z-51.de>
Thu, 3 Jul 2025 16:35:51 +0000 (18:35 +0200)
commit2a85da604590efef4a6d3200a946daa775175b7a
tree8880b3f33a308d79d77d1acd6ddebbe2886453d0
parent2e0d217866edfd6eded4568d0e016de5de1d0237
fs/hfsplus: Set a grub_errno if mount fails

It was possible for mount to fail but not set grub_errno. This led to
a possible double decrement of the module reference count if the NULL
page was mapped.

Fixing in general as a similar bug was fixed in commit 61b13c187
(fs/hfsplus: Set grub_errno to prevent NULL pointer access) and there
are likely more variants around.

Fixes: CVE-2024-45783
Reported-by: B Horn <b@horn.uk>
Signed-off-by: B Horn <b@horn.uk>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Gbp-Pq: Topic cve-2025-jan
Gbp-Pq: Name fs-hfsplus-Set-a-grub_errno-if-mount-fails.patch
grub-core/fs/hfsplus.c